/**
 * Created by zzw on 2016/5/20.
 */

$(function(){
    agentInviteCodeImageUrl();
    agentInviteCodeUrl();
});

//生成二维码图片方法
function agentInviteCodeImageUrl(){
       var imgUrl = serviceAddress.Address+"/agent_app_AgentInvite/agentInviteCodeImageUrl.action?reqData={'token':'"+localStorage.token+"'}";
      $(".img").attr("src",imgUrl);
}

//生成二维码路径
function agentInviteCodeUrl(){
    var param = JSON.stringify({"token": localStorage.token});
    $.fn.serviceInvoke(serviceAddress.Address, 'agent_app_AgentInvite', 'agentInviteCodeUrl.action', param, function (result) {
        debugger;
        $("#foo").val(result.entity);
    })
}